<template>

  <div class="banner">
    <el-carousel :interval="5000" arrow="always" @change="handleChange">
      <el-carousel-item v-for="(item, index) in bannerList" :key="index">
        <img :src="item.image_url" class="banner-img" />
      </el-carousel-item>
    </el-carousel>
  </div>
</template>
<script>


export default {
  name: "banner",

  props: [],
  data() {
    return {
    };
  },
  props: {
    bannerList: {
      type: Array,
      default: () => []
    }
  },
  computed: {


  },
  watch: {},

  created() {
  },

  methods: {
    handleChange(index) {
      this.$emit('changeBanner', index)
    }
  },
};
</script>
<style scoped lang="less">
.banner {
  height: 100%;
  width: 100%;

  .banner-img {
    height: 100%;
    width: 100%;
  }

  /deep/ .el-carousel {
    width: 100% !important;
    height: 100% !important;

  }

  /deep/ .el-carousel__container {
    width: 100% !important;
    height: 100% !important;
  }

  /deep/ .el-carousel__arrow {
    background: rgba(0, 0, 0, 0.1);
    height: 40px !important;
    width: 40px !important;
  }

  /deep/ .el-icon-arrow-right {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5) !important;
  }

  /deep/ .el-icon-arrow-left {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5) !important;
  }

  /deep/ .el-carousel__button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 25px !important;
  }

}
</style>
